package com.jred.jforum.dao.sqlmap;

import java.util.List;
import java.util.Map;

import org.apache.struts.util.MessageResources;

import com.jred.jforum.beans.forum.Forum;
import com.jred.jforum.beans.forum.Message;
import com.jred.jforum.beans.forum.Topic;

public interface ForumDAO {

    public List getGroups(int userStatus, MessageResources messages);

    public List getGroups(int userStatus, boolean filled);
    
    public List getForums(int groupid, boolean filled);
    
    public Forum getForumById(int forumid, boolean filled); 
    
    public List getTopics(int forumid, boolean filled);
    
    public List getTopicsByTagid(Map map, boolean filled);
    
    public Integer countForumTopics(int forumid);
    
	public Message getLastMessageByForumid(int forumid);
	
	public Message getLastMessageByThreadid(int threadid);

	public Topic getThreadById(int threadid, boolean filled);
	
	public List getForumTags(int forumid, boolean filled);
	
	public void updateThreadVcount(int threadid) ;

	public List getThreadMessages(int threadid);
	
	public Integer getNumReplys(int threadid);
	
	/***********************       System         ***********************/
	public Map getSystemConstants();
	
	/***********************       回复            ***********************/
	public int addMessage(Message msg);

	public Message getMessageInfo(int messageid);
	
}
